Optimal. Leaf size=50 \[ \frac {x}{b}-\frac {\sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a-b} \tanh (c+d x)}{\sqrt {a}}\right )}{\sqrt {a-b} b d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 50, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {3250, 3260,
214} \begin {gather*} \frac {x}{b}-\frac {\sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a-b} \tanh (c+d x)}{\sqrt {a}}\right )}{b d \sqrt {a-b}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 214
Rule 3250
Rule 3260
Rubi steps
\begin {align*} \int \frac {\sinh ^2(c+d x)}{a+b \sinh ^2(c+d x)} \, dx &=\frac {x}{b}-\frac {a \int \frac {1}{a+b \sinh ^2(c+d x)} \, dx}{b}\\ &=\frac {x}{b}-\frac {a \text {Subst}\left (\int \frac {1}{a-(a-b) x^2} \, dx,x,\tanh (c+d x)\right )}{b d}\\ &=\frac {x}{b}-\frac {\sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a-b} \tanh (c+d x)}{\sqrt {a}}\right )}{\sqrt {a-b} b d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.09, size = 50, normalized size = 1.00 \begin {gather*} \frac {c+d x-\frac {\sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a-b} \tanh (c+d x)}{\sqrt {a}}\right )}{\sqrt {a-b}}}{b d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(215\) vs.
\(2(42)=84\).
time = 1.01, size = 216, normalized size = 4.32
method | result | size |
risch | \(\frac {x}{b}+\frac {\sqrt {a \left (a -b \right )}\, \ln \left ({\mathrm e}^{2 d x +2 c}+\frac {2 \sqrt {a \left (a -b \right )}+2 a -b}{b}\right )}{2 \left (a -b \right ) d b}-\frac {\sqrt {a \left (a -b \right )}\, \ln \left ({\mathrm e}^{2 d x +2 c}-\frac {2 \sqrt {a \left (a -b \right )}-2 a +b}{b}\right )}{2 \left (a -b \right ) d b}\) | \(120\) |
derivativedivides | \(\frac {\frac {2 a^{2} \left (\frac {\left (\sqrt {-b \left (a -b \right )}+b \right ) \arctan \left (\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {-b \left (a -b \right )}-a +2 b \right ) a}}\right )}{2 a \sqrt {-b \left (a -b \right )}\, \sqrt {\left (2 \sqrt {-b \left (a -b \right )}-a +2 b \right ) a}}-\frac {\left (\sqrt {-b \left (a -b \right )}-b \right ) \arctanh \left (\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {-b \left (a -b \right )}+a -2 b \right ) a}}\right )}{2 a \sqrt {-b \left (a -b \right )}\, \sqrt {\left (2 \sqrt {-b \left (a -b \right )}+a -2 b \right ) a}}\right )}{b}+\frac {\ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{b}-\frac {\ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{b}}{d}\) | \(216\) |
default | \(\frac {\frac {2 a^{2} \left (\frac {\left (\sqrt {-b \left (a -b \right )}+b \right ) \arctan \left (\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {-b \left (a -b \right )}-a +2 b \right ) a}}\right )}{2 a \sqrt {-b \left (a -b \right )}\, \sqrt {\left (2 \sqrt {-b \left (a -b \right )}-a +2 b \right ) a}}-\frac {\left (\sqrt {-b \left (a -b \right )}-b \right ) \arctanh \left (\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {-b \left (a -b \right )}+a -2 b \right ) a}}\right )}{2 a \sqrt {-b \left (a -b \right )}\, \sqrt {\left (2 \sqrt {-b \left (a -b \right )}+a -2 b \right ) a}}\right )}{b}+\frac {\ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{b}-\frac {\ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{b}}{d}\) | \(216\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 85 vs.
\(2 (42) = 84\).
time = 0.44, size = 464, normalized size = 9.28 \begin {gather*} \left [\frac {2 \, d x + \sqrt {\frac {a}{a - b}} \log \left (\frac {b^{2} \cosh \left (d x + c\right )^{4} + 4 \, b^{2} \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + b^{2} \sinh \left (d x + c\right )^{4} + 2 \, {\left (2 \, a b - b^{2}\right )} \cosh \left (d x + c\right )^{2} + 2 \, {\left (3 \, b^{2} \cosh \left (d x + c\right )^{2} + 2 \, a b - b^{2}\right )} \sinh \left (d x + c\right )^{2} + 8 \, a^{2} - 8 \, a b + b^{2} + 4 \, {\left (b^{2} \cosh \left (d x + c\right )^{3} + {\left (2 \, a b - b^{2}\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right ) + 4 \, {\left ({\left (a b - b^{2}\right )} \cosh \left (d x + c\right )^{2} + 2 \, {\left (a b - b^{2}\right )} \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + {\left (a b - b^{2}\right )} \sinh \left (d x + c\right )^{2} + 2 \, a^{2} - 3 \, a b + b^{2}\right )} \sqrt {\frac {a}{a - b}}}{b \cosh \left (d x + c\right )^{4} + 4 \, b \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + b \sinh \left (d x + c\right )^{4} + 2 \, {\left (2 \, a - b\right )} \cosh \left (d x + c\right )^{2} + 2 \, {\left (3 \, b \cosh \left (d x + c\right )^{2} + 2 \, a - b\right )} \sinh \left (d x + c\right )^{2} + 4 \, {\left (b \cosh \left (d x + c\right )^{3} + {\left (2 \, a - b\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right ) + b}\right )}{2 \, b d}, \frac {d x - \sqrt {-\frac {a}{a - b}} \arctan \left (\frac {{\left (b \cosh \left (d x + c\right )^{2} + 2 \, b \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + b \sinh \left (d x + c\right )^{2} + 2 \, a - b\right )} \sqrt {-\frac {a}{a - b}}}{2 \, a}\right )}{b d}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.27, size = 64, normalized size = 1.28 \begin {gather*} -\frac {\frac {a \arctan \left (\frac {b e^{\left (2 \, d x + 2 \, c\right )} + 2 \, a - b}{2 \, \sqrt {-a^{2} + a b}}\right )}{\sqrt {-a^{2} + a b} b} - \frac {d x + c}{b}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.22, size = 473, normalized size = 9.46 \begin {gather*} \frac {x}{b}-\frac {\sqrt {a}\,\mathrm {atan}\left (\frac {\left (b^5\,\sqrt {b^3\,d^2-a\,b^2\,d^2}-a\,b^4\,\sqrt {b^3\,d^2-a\,b^2\,d^2}\right )\,\left ({\mathrm {e}}^{2\,c}\,{\mathrm {e}}^{2\,d\,x}\,\left (\frac {2\,\left (8\,a^2-8\,a\,b+b^2\right )\,\left (8\,a^{5/2}\,\sqrt {b^3\,d^2-a\,b^2\,d^2}-8\,a^{3/2}\,b\,\sqrt {b^3\,d^2-a\,b^2\,d^2}+\sqrt {a}\,b^2\,\sqrt {b^3\,d^2-a\,b^2\,d^2}\right )}{b^8\,d\,{\left (a-b\right )}^2\,\sqrt {b^3\,d^2-a\,b^2\,d^2}}+\frac {4\,\sqrt {a}\,\left (4\,a-2\,b\right )\,\left (8\,d\,a^3\,b-12\,d\,a^2\,b^2+4\,d\,a\,b^3\right )}{b^7\,\left (a-b\right )\,\sqrt {b^3\,d^2-a\,b^2\,d^2}\,\sqrt {-b^2\,d^2\,\left (a-b\right )}}\right )+\frac {2\,\left (2\,a^{3/2}\,b\,\sqrt {b^3\,d^2-a\,b^2\,d^2}-\sqrt {a}\,b^2\,\sqrt {b^3\,d^2-a\,b^2\,d^2}\right )\,\left (8\,a^2-8\,a\,b+b^2\right )}{b^8\,d\,{\left (a-b\right )}^2\,\sqrt {b^3\,d^2-a\,b^2\,d^2}}+\frac {4\,\sqrt {a}\,\left (2\,a^2\,b^2\,d-2\,a\,b^3\,d\right )\,\left (4\,a-2\,b\right )}{b^7\,\left (a-b\right )\,\sqrt {b^3\,d^2-a\,b^2\,d^2}\,\sqrt {-b^2\,d^2\,\left (a-b\right )}}\right )}{4\,a}\right )}{\sqrt {b^3\,d^2-a\,b^2\,d^2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________